﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Enter.DataProxy.ProxyAdapter.Configuration
{
    /// <summary>
    /// 适配器配置
    /// </summary>
    public class AdapterConfigManager : ConfigurationSection
    {
        private ConfigurationProperty _DatabasesProperty;

        /// <summary>
        /// 适配器可用的数据库
        /// </summary>
        public DatabasesCollection Databases
        {
            get { return (DatabasesCollection)this[_DatabasesProperty]; }
        }


       // private readonly string _readerRegion = "getreader";
       // private readonly string _writerRegion = "getwriter";

        public AdapterConfigManager()
        {
            _DatabasesProperty = new ConfigurationProperty(DatabasesCollection.NodeName, typeof(DatabasesCollection));
  
            this.Properties.Add(_DatabasesProperty);
        }


        public static AdapterConfigManager GetAdapterConfig(string section)
        {
            return (AdapterConfigManager)ConfigurationManager.GetSection(section);
        }

        /// <summary>

    }
}
